
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
    <script>
        var str='';
        $(document).ready(function()
        {
            $("#searchbut").click(function()
            {
                str= "http://localhost/ci/index.php/admin/pagination/StrPro/"+ $("#searchtext").val();
                window.location= str;
            });
        });
</script>

<p class="bold"> List Product</p>

<input id="searchtext" type="text" name = "keyword" />
<button id="searchbut">Tìm</button>

<?php
$this ->table ->set_heading('ID','Name', 'Hình Ảnh','Giá','Mô Tả','Function');
foreach ($list_all as $value) {
    $img= explode(",", $value['product_image']);
    if ($value['product_image']=NULL)
    {
        $src=" Không có hình ảnh";
    }
    else
    {$src= "<img src='".base_url()."images/".$img[0]."' style='width: 67;'/>";}
    $this->table->add_row(
        $value['product_id'],
        $value['product_name'],
        $src,
        $value['product_description']
    );
}

echo $this->table->generate();
?>
<div id="pagination"><?php echo $this->pagination->create_links(); ?></div>